package com.wanbatv.wanba.ahitv.api;

/**
 * Created by Forcs on 15/7/1.
 */
public final class ConfigUtils {

    public static final boolean DEBUG = true;

    public static final ConfigInfo[] API_HOST = new ConfigInfo[] {
            //调试用的ip
            new ApiHostConfigInfo(Channel.CID_DEBUG, "127.0.0.1", 8000),
            //上海渠道
            new ApiHostConfigInfo(Channel.CID_SHANGHAI, Ip.SHANGHEI_CLOUD, Port.DEFAULT),
            //安徽渠道
            new ApiHostConfigInfo(Channel.CID_ANHUI, Ip.ANHUI_CLOUD, Port.DEFAULT),
    };


    /**
     * 渠道号
     */
    public static class Channel {

        /** 渠道ID：调试用的 */
        public static final int CID_DEBUG = -1;
        /** 渠道ID：主渠道 */
        public static final int CID_MAIN = 21;
        /** 渠道ID：上海，和主渠道一致 */
        public static final int CID_SHANGHAI = CID_MAIN;
        /** 渠道ID：安徽 */
        public static final int CID_ANHUI = 23;
        /**
         * 当前使用的渠道号
         */
        public static int CID_CURRENT =CID_ANHUI;
    }

    /**
     * 云主机IP
     */
    public static class Ip {
        /** 上海云主机ip */
        public static final String SHANGHEI_CLOUD = "121.201.7.173";
        /** 安徽云主机ip */
        public static final String ANHUI_CLOUD = "61.191.46.214";
        /** 微信主机ip */
        public static final String WEIXIN = "61.191.46.214";

    }

    /**
     * 端口
     */
    public static class Port {
        /** 通用端口 */
        public static final int DEFAULT = 8080;
        /** 打卡端口 */
        public static final int CHECKIN = 8087;
        /** 微信端口 */
        public static final int WEIXIN = 8088;
        /** 行为统计端口*/
        public static final int BEHAVIOR = 8868;
    }

    /**
     * API接口
     */
    public static class Api {

        /** 升级 */
        public static final String UPGRADE = "wanba_shzg/apk_update.jsp";
        /** 产品信息 */
        public static final String PRODUCT_INFO = "wanba_shzg/ott_product_info.jsp";
        /** 麦克林频道 */
        public static final String CAHNNEL_MIKELIN = "wanba_shzg/ott_channel_mikeling.jsp";
        /** 麦克林7天健身 */
        public static final String CHANNEL_MIKELIN_7DAY = "wanba_shzg/ott_channel_mikeling_7day.jsp";
        /** 麦克林四分钟健身 */
        public static final String CHANNEL_MIKELIN_4MINUTE = "wanba_shzg/ott_channel_mikeling_4minute.jsp";
        /** 蹦蹦跳频道 */
        public static final String CHANNEL_BBT = "wanba_shzg/ott_channel_bbt.jsp";
        /** 健身操频道 */
        public static final String CHANNEL_JSC = "wanba_shzg/ott_channel_jianshencao.jsp";
        /** 街舞频道 */
        public static final String CHANNEL_JW = "wanba_shzg/ott_channel_hippop.jsp";
        /** 睿健频道 */
        public static final String CHANNEL_RJ = "wanba_shzg/ott_channel_ruijian.jsp";
        /** 广场舞频道 */
        public static final String CHANNEL_WGC = "wanba_shzg/ott_channel_wgc.jsp";
        /** 瑜伽频道 */
        public static final String CHANNEL_YOGA = "wanba_shzg/ott_channel_yoga.jsp";
        /** 郑多燕频道 */
        public static final String CHANNEL_ZDY = "wanba_shzg/ott_channel_zdy.jsp";
        /** 肚皮舞频道 */
        public static final String CHANNEL_DPW = "wanba_shzg/ott_channel_dupiwu.jsp";
        /** 获取微信图片 */
        public static final String WX = "wanba/photo_ajax.jsp";
        /** 获取打卡统计信息 */
        public static final String CHECKIN_GET_TOTAL = "checkin/gettotal";
        /** 获取打卡列表 */
        public static final String CHECKIN_GET_LIST = "checkin/getlist";
        /** 添加打开接口 */
        public static final String CHECKIN_ADD = "checkin/add";
        /** 首页内容 */
        public static final String MAIN = "wanba_shzg/ott_main.jsp";
        /** 用户总数据 */
        public static final String USER = "wanba_shzg/ott_user.jsp";
    }



    //----------------------------------------------------------------------------------------//
    /**
     * 配置项类的基本接口，所有配置项信息的类都必须实现该接口
     */
    public interface ConfigInfo {
    }

    /**
     * API地址的配置项信息类
     */
    public static class ApiHostConfigInfo implements ConfigInfo {

        /** 渠道号 */
        public int channelId;
        /** ip */
        public String ip;
        /** 端口 */
        public int port;

        public ApiHostConfigInfo(int channelId, String ip, int port) {
            this.channelId = channelId;
            this.ip = ip;
            this.port = port;
        }
    }
}
